#!/usr/bin/env python
# -*-coding:utf-8-*-
# File    : liyuqi.py

import time
from selenium import webdriver
from poium import Page, Element

class Baidu(Page):
    keyword_input = Element(css="#kw", describe="搜索框")
    search_button = Element(css="#su", describe="百度一下按钮")


if __name__ == '__main__':
    driver = webdriver.Chrome()
    bd_home = Baidu(driver)
    bd_home.get("https://www.baidu.com/")
    bd_home.keyword_input.input("深圳")
    bd_home.search_button.click()
    time.sleep(3)
    driver.close()
    driver.quit()